import {
  BwVueComNameEnum,
  BwAntComNameEnum,
  BwHtmlComNameEnum,
  BwVanComNameEnum,
  BwVxeComNameEnum,
  BwBwComNameEnum,
} from '../render/enums'

import { htmlDivInfo } from './src/html/div'
import { htmlSpanInfo } from './src/html/span'
import { htmlIframeInfo } from './src/html/iframe'

import { vueSlotInfo } from './src/vue/slot'
import { iconInfo } from './src/bwCom/icon'
import { vueComponentInfo } from './src/vue/component'

import { antColInfo } from './src/ant/col'
import { antRowInfo } from './src/ant/row'
import { antFormInfo } from './src/ant/form'
import { antFormItemInfo } from './src/ant/formItem'
import { antInputInfo } from './src/ant/input'
import { antInputSearchInfo } from './src/ant/inputSearch'
import { antAutoCompleteInfo } from './src/ant/autoComplete'
import { antCheckboxInfo } from './src/ant/checkbox'
import { antCheckboxGroupInfo } from './src/ant/checkboxGroup'
import { antDatePickerInfo } from './src/ant/datePicker'
import { antRangePickerInfo } from './src/ant/rangePicker'
import { antNumberInfo } from './src/ant/number'
import { antRadioGroupInfo } from './src/ant/radioGroup'
import { antRadioInfo } from './src/ant/radio'
import { antRateInfo } from './src/ant/rate'
import { antSelectInfo } from './src/ant/select'
import { antSwitchInfo } from './src/ant/switch'
import { antTextareaInfo } from './src/ant/textarea'
import { antTreeSelectInfo } from './src/ant/treeSelect'
import { antModalInfo } from './src/ant/modal'
import { antTimeInfo } from './src/ant/time'
import { antTreeInfo } from './src/ant/tree'
import { antTagInfo } from './src/ant/tag'
import { antButtonInfo } from './src/ant/button'
import { antPaginationInfo } from './src/ant/pagination'
import { antTooltipInfo } from './src/ant/tooltip'
import { antCascaderInfo } from './src/ant/cascader'
import { antTabsInfo } from './src/ant/tabs'
import { antTabPaneInfo } from './src/ant/tabPane'
import { antMenuInfo } from './src/ant/menu'
import { antImageInfo } from './src/ant/image'
import { antUploadInfo } from './src/ant/upload'
import { antPopoverInfo } from './src/ant/popover'

import { vantFormInfo } from './src/vant/form'
import { vantRowInfo } from './src/vant/row'
import { vantColInfo } from './src/vant/col'
import { vantFieldInfo } from './src/vant/field'
import { vantRadioGroupInfo } from './src/vant/radioGroup'
import { vantRadioInfo } from './src/vant/radio'
import { vantCheckboxGroupInfo } from './src/vant/checkboxGroup'
import { vantCheckboxInfo } from './src/vant/checkbox'
import { vantPickerInfo } from './src/vant/picker'
import { vantPickerGroupInfo } from './src/vant/pickerGroup'
import { vantPopupInfo } from './src/vant/popup'
import { vantSwitchInfo } from './src/vant/switch'
import { vantDatePickerInfo } from './src/vant/date'
import { vantTimeInfo } from './src/vant/time'
import { vantRateInfo } from './src/vant/rate'
import { vantCascaderInfo } from './src/vant/cascader'
import { vantCellInfo } from './src/vant/cell'
import { vantCellGroupInfo } from './src/vant/cellGroup'

import { vxeTableInfo } from './src/vxe/table'
import { vxeColgroupInfo } from './src/vxe/colgroup'
import { vxeColumnInfo } from './src/vxe/column'
import { htmlAInfo } from './src/html/a'
import { chartLineInfo } from './src/bwCom/chartLine'
import { chartPieInfo } from './src/bwCom/chartPie'
import { chartBarInfo } from './src/bwCom/chartBar'

/** 获取组件属性集合 */
export function getNodeComAttrs(comName: string) {
  switch (comName) {
    case BwHtmlComNameEnum.div: {
      return htmlDivInfo.comAttrs
    }
    case BwHtmlComNameEnum.span: {
      return htmlSpanInfo.comAttrs
    }
    case BwHtmlComNameEnum.iframe: {
      return htmlIframeInfo.comAttrs
    }
    case BwHtmlComNameEnum.a: {
      return htmlAInfo.comAttrs
    }

    case BwVueComNameEnum.slot: {
      return vueSlotInfo.comAttrs
    }
    case BwVueComNameEnum.component: {
      return vueComponentInfo.comAttrs
    }
    case BwBwComNameEnum.Icon: {
      return iconInfo.comAttrs
    }

    case BwBwComNameEnum.BwChartLine: {
      return chartLineInfo.comAttrs
    }

    case BwBwComNameEnum.BwChartPie: {
      return chartPieInfo.comAttrs
    }

    case BwBwComNameEnum.BwChartBar: {
      return chartBarInfo.comAttrs
    }

    case BwAntComNameEnum.ACol: {
      return antColInfo.comAttrs
    }
    case BwAntComNameEnum.ARow: {
      return antRowInfo.comAttrs
    }
    case BwAntComNameEnum.AForm: {
      return antFormInfo.comAttrs
    }
    case BwAntComNameEnum.AFormItem: {
      return antFormItemInfo.comAttrs
    }

    case BwAntComNameEnum.AAutoComplete: {
      return antAutoCompleteInfo.comAttrs
    }
    case BwAntComNameEnum.ACheckbox: {
      return antCheckboxInfo.comAttrs
    }
    case BwAntComNameEnum.ACheckboxGroup: {
      return antCheckboxGroupInfo.comAttrs
    }
    case BwAntComNameEnum.ADatePicker: {
      return antDatePickerInfo.comAttrs
    }
    case BwAntComNameEnum.AInput: {
      return antInputInfo.comAttrs
    }
    case BwAntComNameEnum.AInputSearch: {
      return antInputSearchInfo.comAttrs
    }
    case BwAntComNameEnum.AInputNumber: {
      return antNumberInfo.comAttrs
    }
    case BwAntComNameEnum.ARadioGroup: {
      return antRadioGroupInfo.comAttrs
    }
    case BwAntComNameEnum.ARadio: {
      return antRadioInfo.comAttrs
    }
    case BwAntComNameEnum.ARangePicker: {
      return antRangePickerInfo.comAttrs
    }
    case BwAntComNameEnum.ARate: {
      return antRateInfo.comAttrs
    }
    case BwAntComNameEnum.ASelect: {
      return antSelectInfo.comAttrs
    }
    case BwAntComNameEnum.ASwitch: {
      return antSwitchInfo.comAttrs
    }
    case BwAntComNameEnum.ATextarea: {
      return antTextareaInfo.comAttrs
    }
    case BwAntComNameEnum.ATreeSelect: {
      return antTreeSelectInfo.comAttrs
    }
    case BwAntComNameEnum.ATimePicker: {
      return antTimeInfo.comAttrs
    }
    case BwAntComNameEnum.AModal: {
      return antModalInfo.comAttrs
    }
    case BwAntComNameEnum.ATree: {
      return antTreeInfo.comAttrs
    }
    case BwAntComNameEnum.ATag: {
      return antTagInfo.comAttrs
    }
    case BwAntComNameEnum.AButton: {
      return antButtonInfo.comAttrs
    }
    case BwAntComNameEnum.APagination: {
      return antPaginationInfo.comAttrs
    }
    case BwAntComNameEnum.ATooltip: {
      return antTooltipInfo.comAttrs
    }
    case BwAntComNameEnum.ACascader: {
      return antCascaderInfo.comAttrs
    }
    case BwAntComNameEnum.ATabs: {
      return antTabsInfo.comAttrs
    }
    case BwAntComNameEnum.ATabPane: {
      return antTabPaneInfo.comAttrs
    }
    case BwAntComNameEnum.AMenu: {
      return antMenuInfo.comAttrs
    }
    case BwAntComNameEnum.AImage: {
      return antImageInfo.comAttrs
    }
    case BwAntComNameEnum.AUpload: {
      return antUploadInfo.comAttrs
    }
    case BwAntComNameEnum.APopover: {
      return antPopoverInfo.comAttrs
    }

    case BwVanComNameEnum.VanForm: {
      return vantFormInfo.comAttrs
    }
    case BwVanComNameEnum.VanRow: {
      return vantRowInfo.comAttrs
    }
    case BwVanComNameEnum.VanCol: {
      return vantColInfo.comAttrs
    }
    case BwVanComNameEnum.VanField: {
      return vantFieldInfo.comAttrs
    }
    case BwVanComNameEnum.VanRadioGroup: {
      return vantRadioGroupInfo.comAttrs
    }
    case BwVanComNameEnum.VanRadio: {
      return vantRadioInfo.comAttrs
    }
    case BwVanComNameEnum.VanCheckboxGroup: {
      return vantCheckboxGroupInfo.comAttrs
    }
    case BwVanComNameEnum.VanCheckbox: {
      return vantCheckboxInfo.comAttrs
    }
    case BwVanComNameEnum.VanPicker: {
      return vantPickerInfo.comAttrs
    }
    case BwVanComNameEnum.VanPickerGroup: {
      return vantPickerGroupInfo.comAttrs
    }
    case BwVanComNameEnum.VanSwitch: {
      return vantSwitchInfo.comAttrs
    }
    case BwVanComNameEnum.VanPopup: {
      return vantPopupInfo.comAttrs
    }
    case BwVanComNameEnum.VanDatePicker: {
      return vantDatePickerInfo.comAttrs
    }
    case BwVanComNameEnum.VanTimePicker: {
      return vantTimeInfo.comAttrs
    }
    case BwVanComNameEnum.VanRate: {
      return vantRateInfo.comAttrs
    }
    case BwVanComNameEnum.VanCascader: {
      return vantCascaderInfo.comAttrs
    }
    case BwVanComNameEnum.VanCell: {
      return vantCellInfo.comAttrs
    }
    case BwVanComNameEnum.VanCellGroup: {
      return vantCellGroupInfo.comAttrs
    }

    case BwVxeComNameEnum.VxeTable: {
      return vxeTableInfo.comAttrs
    }
    case BwVxeComNameEnum.VxeColgroup: {
      return vxeColgroupInfo.comAttrs
    }
    case BwVxeComNameEnum.VxeColumn: {
      return vxeColumnInfo.comAttrs
    }

    default: {
      return []
    }
  }
}

/** 获取组件事件集合 */
export function getNodeComEmits(comName: string) {
  switch (comName) {
    case BwHtmlComNameEnum.div: {
      return htmlDivInfo.comEmits
    }
    case BwHtmlComNameEnum.span: {
      return htmlSpanInfo.comEmits
    }
    case BwHtmlComNameEnum.iframe: {
      return htmlIframeInfo.comEmits
    }
    case BwHtmlComNameEnum.a: {
      return htmlAInfo.comEmits
    }

    case BwVueComNameEnum.component: {
      return vueComponentInfo.comEmits
    }

    case BwBwComNameEnum.Icon: {
      return iconInfo.comEmits
    }

    case BwBwComNameEnum.BwChartLine: {
      return chartLineInfo.comEmits
    }

    case BwBwComNameEnum.BwChartPie: {
      return chartPieInfo.comEmits
    }

    case BwBwComNameEnum.BwChartBar: {
      return chartBarInfo.comEmits
    }

    case BwAntComNameEnum.ACol: {
      return antColInfo.comEmits
    }
    case BwAntComNameEnum.ARow: {
      return antRowInfo.comEmits
    }
    case BwAntComNameEnum.AForm: {
      return antFormInfo.comEmits
    }
    case BwAntComNameEnum.AFormItem: {
      return antFormItemInfo.comEmits
    }
    case BwAntComNameEnum.AInput: {
      return antInputInfo.comEmits
    }
    case BwAntComNameEnum.AInputSearch: {
      return antInputSearchInfo.comEmits
    }
    case BwAntComNameEnum.AAutoComplete: {
      return antAutoCompleteInfo.comEmits
    }
    case BwAntComNameEnum.ACheckbox: {
      return antCheckboxInfo.comEmits
    }
    case BwAntComNameEnum.ACheckboxGroup: {
      return antCheckboxGroupInfo.comEmits
    }
    case BwAntComNameEnum.ADatePicker: {
      return antDatePickerInfo.comEmits
    }
    case BwAntComNameEnum.AInputNumber: {
      return antNumberInfo.comEmits
    }
    case BwAntComNameEnum.ARadioGroup: {
      return antRadioGroupInfo.comEmits
    }
    case BwAntComNameEnum.ARadio: {
      return antRadioInfo.comEmits
    }
    case BwAntComNameEnum.ARangePicker: {
      return antRangePickerInfo.comEmits
    }
    case BwAntComNameEnum.ARate: {
      return antRateInfo.comEmits
    }
    case BwAntComNameEnum.ASelect: {
      return antSelectInfo.comEmits
    }
    case BwAntComNameEnum.ASwitch: {
      return antSwitchInfo.comEmits
    }
    case BwAntComNameEnum.ATextarea: {
      return antTextareaInfo.comEmits
    }
    case BwAntComNameEnum.ATreeSelect: {
      return antTreeSelectInfo.comEmits
    }
    case BwAntComNameEnum.ATimePicker: {
      return antTimeInfo.comEmits
    }
    case BwAntComNameEnum.AModal: {
      return antModalInfo.comEmits
    }
    case BwAntComNameEnum.ATree: {
      return antTreeInfo.comEmits
    }
    case BwAntComNameEnum.ATag: {
      return antTagInfo.comEmits
    }
    case BwAntComNameEnum.AButton: {
      return antButtonInfo.comEmits
    }
    case BwAntComNameEnum.APagination: {
      return antPaginationInfo.comEmits
    }
    case BwAntComNameEnum.ATooltip: {
      return antTooltipInfo.comEmits
    }
    case BwAntComNameEnum.ACascader: {
      return antCascaderInfo.comEmits
    }
    case BwAntComNameEnum.ATabs: {
      return antTabsInfo.comEmits
    }
    case BwAntComNameEnum.ATabPane: {
      return antTabPaneInfo.comEmits
    }
    case BwAntComNameEnum.AMenu: {
      return antMenuInfo.comEmits
    }
    case BwAntComNameEnum.AImage: {
      return antImageInfo.comEmits
    }
    case BwAntComNameEnum.AUpload: {
      return antUploadInfo.comEmits
    }
    case BwAntComNameEnum.APopover: {
      return antPopoverInfo.comEmits
    }

    case BwVanComNameEnum.VanForm: {
      return vantFormInfo.comEmits
    }
    case BwVanComNameEnum.VanRow: {
      return vantRowInfo.comEmits
    }
    case BwVanComNameEnum.VanCol: {
      return vantColInfo.comEmits
    }
    case BwVanComNameEnum.VanField: {
      return vantFieldInfo.comEmits
    }
    case BwVanComNameEnum.VanRadioGroup: {
      return vantRadioGroupInfo.comEmits
    }
    case BwVanComNameEnum.VanRadio: {
      return vantRadioInfo.comEmits
    }
    case BwVanComNameEnum.VanCheckboxGroup: {
      return vantCheckboxGroupInfo.comEmits
    }
    case BwVanComNameEnum.VanCheckbox: {
      return vantCheckboxInfo.comEmits
    }
    case BwVanComNameEnum.VanPicker: {
      return vantPickerInfo.comEmits
    }
    case BwVanComNameEnum.VanPickerGroup: {
      return vantPickerGroupInfo.comEmits
    }
    case BwVanComNameEnum.VanSwitch: {
      return vantSwitchInfo.comEmits
    }
    case BwVanComNameEnum.VanPopup: {
      return vantPopupInfo.comEmits
    }
    case BwVanComNameEnum.VanDatePicker: {
      return vantDatePickerInfo.comEmits
    }
    case BwVanComNameEnum.VanTimePicker: {
      return vantTimeInfo.comEmits
    }
    case BwVanComNameEnum.VanRate: {
      return vantRateInfo.comEmits
    }
    case BwVanComNameEnum.VanCascader: {
      return vantCascaderInfo.comEmits
    }
    case BwVanComNameEnum.VanCell: {
      return vantCellInfo.comEmits
    }
    case BwVanComNameEnum.VanCellGroup: {
      return vantCellGroupInfo.comEmits
    }

    case BwVxeComNameEnum.VxeTable: {
      return vxeTableInfo.comEmits
    }
    case BwVxeComNameEnum.VxeColgroup: {
      return vxeColgroupInfo.comEmits
    }
    case BwVxeComNameEnum.VxeColumn: {
      return vxeColumnInfo.comEmits
    }

    default: {
      return []
    }
  }
}

/** 获取组件插槽集合 */
export function getNodeComSlots(comName: string) {
  switch (comName) {
    case BwHtmlComNameEnum.div: {
      return htmlDivInfo.comSlots
    }
    case BwHtmlComNameEnum.span: {
      return htmlSpanInfo.comSlots
    }
    case BwHtmlComNameEnum.iframe: {
      return htmlIframeInfo.comSlots
    }
    case BwHtmlComNameEnum.a: {
      return htmlAInfo.comSlots
    }

    case BwBwComNameEnum.Icon: {
      return iconInfo.comSlots
    }

    case BwBwComNameEnum.BwChartLine: {
      return chartLineInfo.comSlots
    }

    case BwBwComNameEnum.BwChartPie: {
      return chartPieInfo.comSlots
    }

    case BwBwComNameEnum.BwChartBar: {
      return chartBarInfo.comSlots
    }

    case BwVueComNameEnum.component: {
      return vueComponentInfo.comSlots
    }

    case BwAntComNameEnum.ACol: {
      return antColInfo.comSlots
    }
    case BwAntComNameEnum.ARow: {
      return antRowInfo.comSlots
    }
    case BwAntComNameEnum.AForm: {
      return antFormInfo.comSlots
    }
    case BwAntComNameEnum.AFormItem: {
      return antFormItemInfo.comSlots
    }
    case BwAntComNameEnum.AInput: {
      return antInputInfo.comSlots
    }
    case BwAntComNameEnum.AInputSearch: {
      return antInputSearchInfo.comSlots
    }
    case BwAntComNameEnum.AAutoComplete: {
      return antAutoCompleteInfo.comSlots
    }
    case BwAntComNameEnum.ACheckbox: {
      return antCheckboxInfo.comSlots
    }
    case BwAntComNameEnum.ACheckboxGroup: {
      return antCheckboxGroupInfo.comSlots
    }
    case BwAntComNameEnum.ADatePicker: {
      return antDatePickerInfo.comSlots
    }
    case BwAntComNameEnum.AInputNumber: {
      return antNumberInfo.comSlots
    }
    case BwAntComNameEnum.ARadioGroup: {
      return antRadioGroupInfo.comSlots
    }
    case BwAntComNameEnum.ARadio: {
      return antRadioInfo.comSlots
    }
    case BwAntComNameEnum.ARangePicker: {
      return antRangePickerInfo.comSlots
    }
    case BwAntComNameEnum.ARate: {
      return antRateInfo.comSlots
    }
    case BwAntComNameEnum.ASelect: {
      return antSelectInfo.comSlots
    }
    case BwAntComNameEnum.ASwitch: {
      return antSwitchInfo.comSlots
    }
    case BwAntComNameEnum.ATextarea: {
      return antTextareaInfo.comSlots
    }
    case BwAntComNameEnum.ATreeSelect: {
      return antTreeSelectInfo.comSlots
    }
    case BwAntComNameEnum.AModal: {
      return antModalInfo.comSlots
    }
    case BwAntComNameEnum.ATimePicker: {
      return antTimeInfo.comSlots
    }
    case BwAntComNameEnum.ATree: {
      return antTreeInfo.comSlots
    }
    case BwAntComNameEnum.ATag: {
      return antTagInfo.comSlots
    }
    case BwAntComNameEnum.AButton: {
      return antButtonInfo.comSlots
    }
    case BwAntComNameEnum.APagination: {
      return antPaginationInfo.comSlots
    }
    case BwAntComNameEnum.ATooltip: {
      return antTooltipInfo.comSlots
    }
    case BwAntComNameEnum.ACascader: {
      return antCascaderInfo.comSlots
    }
    case BwAntComNameEnum.ATabs: {
      return antTabsInfo.comSlots
    }
    case BwAntComNameEnum.ATabPane: {
      return antTabPaneInfo.comSlots
    }
    case BwAntComNameEnum.AMenu: {
      return antMenuInfo.comSlots
    }
    case BwAntComNameEnum.AImage: {
      return antImageInfo.comSlots
    }
    case BwAntComNameEnum.AUpload: {
      return antUploadInfo.comSlots
    }
    case BwAntComNameEnum.APopover: {
      return antPopoverInfo.comSlots
    }

    case BwVanComNameEnum.VanForm: {
      return vantFormInfo.comSlots
    }
    case BwVanComNameEnum.VanRow: {
      return vantRowInfo.comSlots
    }
    case BwVanComNameEnum.VanCol: {
      return vantColInfo.comSlots
    }
    case BwVanComNameEnum.VanField: {
      return vantFieldInfo.comSlots
    }
    case BwVanComNameEnum.VanRadioGroup: {
      return vantRadioGroupInfo.comSlots
    }
    case BwVanComNameEnum.VanRadio: {
      return vantRadioInfo.comSlots
    }
    case BwVanComNameEnum.VanCheckboxGroup: {
      return vantCheckboxGroupInfo.comSlots
    }
    case BwVanComNameEnum.VanCheckbox: {
      return vantCheckboxInfo.comSlots
    }
    case BwVanComNameEnum.VanPicker: {
      return vantPickerInfo.comSlots
    }
    case BwVanComNameEnum.VanPickerGroup: {
      return vantPickerGroupInfo.comSlots
    }
    case BwVanComNameEnum.VanSwitch: {
      return vantSwitchInfo.comSlots
    }
    case BwVanComNameEnum.VanPopup: {
      return vantPopupInfo.comSlots
    }
    case BwVanComNameEnum.VanDatePicker: {
      return vantDatePickerInfo.comSlots
    }
    case BwVanComNameEnum.VanTimePicker: {
      return vantTimeInfo.comSlots
    }
    case BwVanComNameEnum.VanRate: {
      return vantRateInfo.comSlots
    }
    case BwVanComNameEnum.VanCascader: {
      return vantCascaderInfo.comSlots
    }
    case BwVanComNameEnum.VanCell: {
      return vantCellInfo.comSlots
    }
    case BwVanComNameEnum.VanCellGroup: {
      return vantCellGroupInfo.comSlots
    }

    case BwVxeComNameEnum.VxeTable: {
      return vxeTableInfo.comSlots
    }
    case BwVxeComNameEnum.VxeColgroup: {
      return vxeColgroupInfo.comSlots
    }
    case BwVxeComNameEnum.VxeColumn: {
      return vxeColumnInfo.comSlots
    }

    default: {
      return []
    }
  }
}
